<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>修改药敏结果</title>
    <meta http-equiv="keywords" content="enter,your,keywords,here" />
    <meta http-equiv="description" content="A short description of this page." />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <#include "/template/head.html">
    <script type="text/javascript"> 
    $(function() {
    	var $noResults = $("select[name='noResults']");
      var $allInput = $("#ymjgForm :input[tag!='excluded']")
      if($noResults.val()!=null && $noResults.val()!="" && $noResults.val()!="0"){
        $allInput.val("").attr('disabled', 'disabled');
      }else {
    	  $allInput.removeAttr('disabled');
      }
    })
    function adjustXB(){
      var tch = $("#xb_tch").val();
      var pnb = $("#xb_pnb").val()
      if(tch=='+' && pnb=='+'){
        $("#xb").val("非结核分枝杆菌");
      } else if(tch=='+' && pnb=='-'){
        $("#xb").val("人型结核分枝杆菌");
      } else if(tch=='-' && pnb=='-'){
        $("#xb").val("牛型结核分枝杆菌");
      }
    }

    var savedDDLID
    function adjustResult(){
      var $noResults = $("select[name='noResults']");
      var $allInput = $("#ymjgForm :input[tag!='excluded']")
      if($noResults.val()!=null && $noResults.val()!="" && $noResults.val()!="0"){
        if(confirm("警告：将会清除上面所有填写内容，是否继续？"))
        	$allInput.val("").attr('disabled', 'disabled');
        else
            $noResults.val(savedDDLID)
      }else {
    	  $allInput.removeAttr('disabled');
      }
      savedDDLID=$noResults.val();
    }
    function checkKicid(){
      var $kicid = $("#kicid");
      var val = $kicid.val();
      if (val!="" && !isNaN(val)) {
    	  if(val.length<8) {
 	        while (val.length<8) {val = '0' + val;}
 	       	$kicid.val(val);
 	      }
        return true;
      } else {
        $(".error").html("<img src='${basePath}img/unchecked.gif'/>KICID号输入不正确！")
      	return false;
      }
    }
    </script> 
  </head>
  <body>
  <#macro chkSelect status val="null">
    <#if val!="null" && val==status>selected="selected"</#if>
  </#macro>
    <form id="ymjgForm" action="${basePath}ymjg/update.do" method="post">
      <table class="cmxform" cellspacing="1">
        <caption>修&nbsp;&nbsp;改&nbsp;&nbsp;药&nbsp;&nbsp;敏&nbsp;&nbsp;结&nbsp;&nbsp;果</caption>
        <tr>
          <th width="12%">KICID号：</th>
          <td colspan="3">
            <input name="kicid" value="${baseInfo.kicid}" readonly="readonly" tag="excluded"/>
          </td>
        </tr>
        <tr>
          <td colspan="4">病人基本信息</td>
        </tr>
	      <tr>
	        <th width="12%">病人登记号：</th>
	        <td width="38%">${baseInfo.djhm}</td>
	        <th width="12%">报告单位：</th>
	        <td width="38%">${baseInfo.djdw.dwmc}</td>
	      </tr>
	      <tr>
	        <th>病人姓名：</th>
	        <td>${baseInfo.brxm}</td>
	        <th>登记日期：</th>
	        <td >${baseInfo.djrq}</td>
	      </tr>
	      <tr>
	        <th>性别：</th>
	        <td>
	          <#if baseInfo.brxb?? && baseInfo.brxb==1>男<#else>女</#if>
	        </td>
	        <th>出生日期：</th>
	        <td>${baseInfo.csrq}</td>
	      </tr>
        <tr>
          <td colspan="4">药敏结果录入（比例法）<br />
            <span style="color:blue">本表填写说明：日期格式 yyyy-MM-dd；</span>
          </td>
        </tr>
        <tr>
          <th>一、MIRU分型结果：</th>
          <td colspan="3"><input name="miru" value="${ymjg.miru}"/></td>
        </tr>
        <tr>
          <th>二、VNTR分型结果：</th>
          <td colspan="3"><input name="vntr" value="${ymjg.vntr}"/></td>
        </tr>
        <tr>
          <th>三、RD105分型结果：</th>
          <td colspan="3"><input name="rd105" value="${ymjg.rd105}"/></td>
        </tr>
        <tr>
        <th>四、药敏结果：</th>
          <td colspan="3">
            <table class="inform" cellspacing="1">
              <tr>
                <th width="20%">INH（异烟肼）：</th>
                <td width="80%">
                  <select name="ym_inh">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_inh/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_inh/>>S</option>
                  </select>0.2
                </td>
              </tr>
              <tr>
                <th>RFP（利福平）：</th>
                <td colspan="3">
                  <select name="ym_rfp">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_rfp/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_rfp/>>S</option>
                  </select>40.0
                </td>
              </tr>
              <tr>
                <th>EMB（乙胺丁醇）：</th>
                <td colspan="3">
                  <select name="ym_emb">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_emb/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_emb/>>S</option>
                  </select>2.0
                </td>
              </tr>
              <tr>
                <th>SM（链霉素）：</th>
                <td colspan="3">
                  <select name="ym_sm">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_sm/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_sm/>>S</option>
                  </select>4.0
                </td>
              </tr>
              <tr>
                <th>PAS（对氨水杨酸）：</th>
                <td colspan="3">
                  <select name="ym_pas">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_pas/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_pas/>>S</option>
                  </select>1.0
                </td>
              </tr>
              <tr>
                <th>KM（卡那霉素）：</th>
                <td colspan="3">
                  <select name="ym_km">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_km/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_km/>>S</option>
                  </select>3.0
                </td>
              </tr>
              <tr>
                <th>OFLX（氧氟沙星）：</th>
                <td colspan="3">
                  <select name="ym_oflx">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_oflx/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_oflx/>>S</option>
                  </select>30.0
                </td>
              </tr>
              <tr>
                <th>CPM（卷曲霉素）：</th>
                <td colspan="3">
                  <select name="ym_cpm">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_cpm/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_cpm/>>S</option>
                  </select>40.0
                </td>
              </tr>
              <tr>
                <th>ETO/PTO（乙硫丙硫异烟肼）：</th>
                <td colspan="3">
                  <select name="ym_etopto">
                    <option></option>
                    <option <@chkSelect status="R" val=ymjg.ym_etopto/>>R</option>
                    <option <@chkSelect status="S" val=ymjg.ym_etopto/>>S</option>
                  </select>40.0
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <th>五、菌型鉴定结果：</th>
          <td colspan="3">
            <table class="inform" cellspacing="1">
              <tr>
                <th width="20%">1、HPLC结果：</th>
                <td width="80%"><input name="hplc_class" value="${ymjg.hplc_class}" class="w80"/>&nbsp;&nbsp;<input name="hplc_jm" value="${ymjg.hplc_jm}" class="w80"/></td>
              </tr>
              <tr>
                <th>2、型别鉴定：</th>
                <td colspan="3">
                  <label for="xb_tch">TCH</label>
                  <select id="xb_tch" name="xb_tch" onchange="adjustXB();">
                    <option></option>
                    <option value="+" <@chkSelect status="+" val=ymjg.xb_tch/>>+</option>
                    <option value="-" <@chkSelect status="-" val=ymjg.xb_tch/>>-</option>
                  </select>
                  <label for="xb_pnb">PNB</label>
                  <select id="xb_pnb" name="xb_pnb" onchange="adjustXB();">
                    <option></option>
                    <option value="+" <@chkSelect status="+" val=ymjg.xb_pnb/>>+</option>
                    <option value="-" <@chkSelect status="-" val=ymjg.xb_pnb/>>-</option>
                  </select>
                  <label for="xb">型别</label>
                  <input id="xb" name="xb" value="${ymjg.xb}"/>
                </td>
              </tr>
              <tr>
                <th>3、基因测序（16srRNA）</th>
                <td colspan="3"><input name="srrna" value="${ymjg.srrna}"/></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr style="color: red">
	        <th>六、未获得试验结果：</th>
	        <td colspan="3">
	        	<select id="noResults" name="noResults" onchange="adjustResult();" tag="excluded">
	        		<option value="0"></option>
	        		<#list constants.noResults as item>
              <option value="${item_index+1}" <@chkSelect status=item_index+1 val=ymjg.noResults/>>${item}</option>
              </#list>
	        	</select>
	        </td>
	      </tr>
        <tfoot>
          <tr>
            <td colspan="4">
              <button type="submit" class="save" tag="excluded"/>
            </td>
          </tr>
        </tfoot>
      </table>
    </form>
    <#include "/template/common/alert_message.html"/>
  </body>
</html>
